import { request } from 'umi';
// 获取所有的todoList列表数据
export async function getTodoLists() {
    return request('/api/todolists')
}

// 添加todo数据
export async function add(params:any) {
    return request('/api/todo',{method:'POST',data:params})
}
// 修改todolist的状态
export const edit = async (data: any)=>{
    const url = 'api/edit'
    const options = {
        method:'PUT',
        data
    }
    return request(url,options)
}
